home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-23 | 3.2 KB | 65 lines | [TEXT/GEOL] |
- Item 6786355 19-March-90 10:41PST
-
- From: PILLAR.CORP Pillar, Chris Ovard,PRT
-
- To: AUST0134 Jam Software Sydney,IVR
- MADA2 MacApp Dev Assoc, Curtis Faith,IVC
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: Printing Response
-
- This link is in response to several recent links about printing in MacApp.
- Sorry for my delay in responding but deadlines loom ahead...
-
- To Tommi of Kopfwerk, Austeria:
-
- You mention trouble printing on the LaserWriter. Since the LaserWriter is a
- PostScript printer, it doesn't fully support QuickDraw. In particular I know
- that it doesn't support all region manipulations. For example, when you resize
- a view, MacApp invalidates some region of the view (TView.Resize). If you
- resize a view while you are printing you are very likely to crash. The only
- documentation of the LaserWriter limits that I know of are in Inside Mac
- II-156.
-
- Your second question is about offseting your headers when printing a grid view.
- Here is how I resolved the problem. I have a subclass of TView,
- TAdornSuperView, that holds all of the other views that I want to draw in
- AdornPage. This subclass exists primarily to deal with focusing, it is similar
- to a TWindow in that it knows how to focus itself into QuickDraw coordinates.
- Anyway my header view is a subview of this TAdornSuperView during printing.
- Below is a fragment of my AdornPage method:
-
- topLeftCorner := {calculations to find position on page for header}
- topLeftCorner.h := topLeftCorner.h - fViewedRect.left;
- headerView.Locate(topLeftCorner.h, topLeftCorner.v, FALSE);
- ...
- adornSuperView.DrawContents;
-
- The local variable topLeftCorner is a VPoint. The code calculates the position
- of headerView in the adornSuperView. First what you would think of as the
- "normal" position of the view is found. fViewedRect contains the part of fView
- that the standard print handler is printing on the current page. Therefore
- subtracting the left edge of that view from the position of the header view
- effectively offsets the view on each subsequent vertical strip of the printout.
- Since the clipping rectancgle prevents us from drawing outside the page what
- you get on the printout is exactly what is needed on wide printouts. After
- coding this it occured to me that the TScroller class could probably be used to
- accomplish much the same thing.
-
- To Curtis Faith:
-
- I think the above ideas will be of some use to you in printing the logos you
- talked about on 3/16/90. It will allow you to print the view in different
- spots on each page (the current page is always available in fFocusedPage). As
- far as printing only parts of the view on different pages you might try laying
- out your view so the unneeded parts get clipped as above. I'm not sure if that
- will work since I don't know where the view is coming from and its layout.
-
- You are right about the print handler setting up the clipping region so the
- desired part of the view is printed on each page. As I understand the
- coordinate translation from the view to the printed page, there really isn't
- any. The fPageAreas data is defined in such a way that 0,0 of the view being
- printed and 0,0 of the grafPort correspond.
-
-